Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize evaluating expressions for charts & fix diff_last aggregates #1649

Merged
merged 3 commits into from
Jan 21, 2023

Conversation

crnjan
Copy link
Contributor

@crnjan crnjan commented Jan 17, 2023

This is a re-take from #1638 where I managed to mess up my git repo, sorry for double work and inconvenience :(

PR is based on #1419. Also contains fixes from #1634.

fixes #1418
fixes #1295
fixes #1102
fixes #1072

Went through cases reported in above issues and seems to work now. Also, as far as I tested (so far) locally with my setup seems to work - but probably don't have all use-cases setup so probably missed something - therefore would be much appreciated if any volunteer tries it out too, thank you!

@crnjan crnjan requested a review from a team as a code owner January 17, 2023 14:22
Signed-off-by: Boris Krivonog boris.krivonog@inova.si

Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
…when calculating diff

Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
Signed-off-by: Boris Krivonog boris.krivonog@inova.si

Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
@crnjan crnjan force-pushed the feature/charts_support_for_expressions_2 branch from 03db87f to 310fc1a Compare January 17, 2023 14:22
@relativeci
Copy link

relativeci bot commented Jan 17, 2023

Job #713: Bundle Size — 15.97MiB (0%).

35b0cf2(current) vs 4fd87f4 main#712(baseline)

Metrics (no changes)
                 Current
Job #713
     Baseline
Job #712
Initial JS 1.73MiB 1.73MiB
Initial CSS 608.52KiB 608.52KiB
Cache Invalidation 0% 0%
Chunks 218 218
Assets 688 688
Modules 2011 2011
Duplicate Modules 108 108
Duplicate Code 1.8% 1.8%
Packages 133 133
Duplicate Packages 15 15
Total size by type (no changes)
                 Current
Job #713
     Baseline
Job #712
CSS 856.56KiB 856.56KiB
Fonts 1.08MiB 1.08MiB
HTML 1.23KiB 1.23KiB
IMG 140.74KiB 140.74KiB
JS 9.04MiB 9.04MiB
Media 295.6KiB 295.6KiB
Other 4.59MiB 4.59MiB

View job #713 reportView main branch activity

@ghys
Copy link
Member

ghys commented Jan 20, 2023

LGTM but since:

Also contains fixes from #1634.

I'll merge after the problems reported there are solved to avoid regressions with the default rrd4j service.

@cweitkamp
Copy link
Contributor

The regression in RRD4J will be solved by openhab/openhab-addons#14238 (see #1634 (comment)).

@crnjan
Copy link
Contributor Author

crnjan commented Jan 20, 2023

LGTM but since:

Also contains fixes from #1634.

Decided to include those changes too, otherwise there would be a conflict, thx for checking.

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since openhab/openhab-addons#14238 is merged (haven't had the opportunity to check as I'm not running 4.0-SNAPSHOT in production where I have plenty of data to test, I'll trust it's looking good now).

Nice list of fixed issues here btw ;)

fixes #1418
fixes #1295
fixes #1102
fixes #1072
fixes #912

@ghys ghys merged commit 231368e into openhab:main Jan 21, 2023
@ghys ghys changed the title charts - generalize evaluating expressions for charts Generalize evaluating expressions for charts & fix diff_last aggregates Jan 21, 2023
@ghys ghys added enhancement New feature or request main ui Main UI labels Jan 21, 2023
@ghys ghys added this to the 4.0 milestone Jan 21, 2023
@crnjan
Copy link
Contributor Author

crnjan commented Jan 29, 2023

Using rrd4j (as default provider) and requesting i.e.

http://<ip>/rest/persistence/items/gBasement_BoilerRoom_HP_RAD_InOperation_HP?starttime=2022-12-31T23%3A00%3A00.000Z&endtime=2023-01-31T22%3A59%3A59.999Z&boundary=true 

will return

{
"cause1":"java.lang.OutOfMemoryError: Java heap space",
"servlet":"cxf-servlet",
"cause0":"org.apache.cxf.interceptor.Fault: Java heap space",
"message":"org.apache.cxf.interceptor.Fault: Java heap space",
"url":"/rest/persistence/items/gBasement_BoilerRoom_HP_RAD_InOperation_HP",
"status":"500"
}

and requesting the same without the boundary parameter will return datapoints ...

Also, requesting the same range with boundary=true using influxdb also works fine (I usually use influxdb for charts therefore did not see this before):

http://<ip>/rest/persistence/items/gBasement_BoilerRoom_HP_RAD_InOperation_HP?starttime=2022-12-31T23%3A00%3A00.000Z&endtime=2023-01-31T22%3A59%3A59.999Z&boundary=true&serviceId=influxdb

also returns datapoints for given interval.

Maybe @cweitkamp? Running snapshot #3293.

Not sure if I should rather open a new issue, please let me know.

@crnjan crnjan deleted the feature/charts_support_for_expressions_2 branch January 29, 2023 10:16
@cweitkamp
Copy link
Contributor

I am not using RRD4j. I am using MariaDB.

florian-h05 added a commit to florian-h05/openhab-docs that referenced this pull request Aug 1, 2023
The docs mention chart pages as an exception where expressions aren't supported, but openhab/openhab-webui#1649 introduced support. This updates the docs.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
stefan-hoehn pushed a commit to openhab/openhab-docs that referenced this pull request Aug 7, 2023
* Update Main UI expressions docs

The docs mention chart pages as an exception where expressions aren't supported, but openhab/openhab-webui#1649 introduced support. This updates the docs.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Update building-pages.md

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
3 participants